import request from '@/utils/request'

const api_name = '/admin/system/sysMenu'

export const FindNodes = () => {
    //debugger
    return request({
        url: `${api_name}/findNodes`,
        method: 'get'
    })
}


export const SaveData = (data) => {
    return request({
        url: `${api_name}/save`,
        method: 'post',
        data
    })
}

export const UpdateById = (data) => {
    return request({
        url: `${api_name}/updateById`,
        method: 'put',
        data
    })
}

export const RemoveSysMenuById = (id) => {
    return request({
        url: `${api_name}/removeById/${id}`,
        method: 'delete'
    })
}

export const FindSysRoleMenuByRoleId = (roleId) => {
    return request({
        url: `/admin/system/sysRoleMenu/findSysRoleMenuByRoleId/${roleId}`,
        method: 'get'
    })
}